/************************* 版权声明 *********************************
 * 
 * 版权所有：meymey
 * 
 ************************* 版本声明 *********************************
 *@since jdk1.5
 *@version 0.6
 ************************* 类描述 *********************************×
 *新闻实体
 ************************* To  Do *********************************
 */
package com.realgodo.site.entity.site;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.realgodo.site.entity.IdEntity;

@Entity
@Table(name = "news")
public class News extends IdEntity {

	private static final long serialVersionUID = -7027815345604322782L;

	private String title;

	private String cover;

	private String content;

	private int front = NOT_FRONT;
	public static final int FRONT = 1;
	public static final int NOT_FRONT = 0;

	private String flashPath;
	
	private String mp3Path;

	private Date publishDate = new Date();

	private int status;

	public static final int Draft = 0;
	public static final int PUBLISHED = 1;
	public static final int DELETED = 2;
	public static final int ALL = -1;

	@Column(name = "title")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "cover")
	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "content", insertable = true, updatable = true)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "status")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "flash_path")
	public String getFlashPath() {
		return flashPath;
	}

	public void setFlashPath(String flashPath) {
		this.flashPath = flashPath;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "publish_date", insertable = true, updatable = true)
	public Date getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	@Column(name = "front")
	public int getFront() {
		return front;
	}

	public void setFront(int front) {
		this.front = front;
	}

	@Column(name = "mp3_path")
	public String getMp3Path() {
		return mp3Path;
	}

	public void setMp3Path(String mp3Path) {
		this.mp3Path = mp3Path;
	}

	
}
